package dao;

import dao.inte.DeliveryMethodRepository;
import domain.shop.DeliveryMethod;

import javax.inject.Singleton;

@Singleton
public class DeliveryMethodRepositoryImpl extends AbstractEntityRepository<DeliveryMethod> implements DeliveryMethodRepository {

    public DeliveryMethodRepositoryImpl() {
        super(DeliveryMethod.class);
    }

    @Override
    protected Class<DeliveryMethod> getEntityClass() {
        return DeliveryMethod.class;
    }

    public DeliveryMethod create() throws Exception {
        DeliveryMethod deliveryMethod = new DeliveryMethod();
        return save(deliveryMethod);
    }
}
